

import VueRouter from 'vue-router';

// 导入自己创建的4个tabbar组件
import member from './components/tabbar/MemberContainer.vue';
import search from './components/tabbar/SearchContainer.vue';
import shopcar from './components/tabbar/ShopcarContainer.vue';
import home from './components/tabbar/HomeContainer.vue';

// 导入新闻列表组件
import newsList from './components/news/newsList.vue';
import newsDetail from './components/news/newsDetail.vue';

// 创建一个路由对象
var router = new VueRouter({
    routes: [
        {path: '/', redirect: '/home'},
        {path: '/member', component: member},
        {path: '/shopcar', component: shopcar},
        {path: '/search', component: search},
        {path: '/home', component: home},
        {path: '/home/newsList', component: newsList},
        {path: '/home/newsDetail/:id', component: newsDetail}
    ],
    linkActiveClass: 'mui-active'
});

export default router;